package route

import (
	"github.com/gin-gonic/gin"
	"github.com/vueadmin/app/admin/internal/handler/baseconfig"
	"github.com/vueadmin/app/admin/internal/middle"
	"github.com/vueadmin/app/admin/internal/svc"
	"github.com/vueadmin/middleware"
	"github.com/vueadmin/utils/conv"
)

type Baseconfig struct{}

/**
 * @description(基本配置路由)
 * @buildcode(true)
*/
func (Baseconfig) RegisterRoute(route *gin.Engine, svcCtx *svc.ServiceContext) {
	r := route.Group(svcCtx.Config.Prefix)
	r.Use(middleware.JwtVerifyMiddleware(conv.String(svcCtx.Config.Jwt)), middle.NewBeforActionMiddleware(svcCtx).Handle())

	r.POST("/Baseconfig/index", func(c *gin.Context) {baseconfig.Index(c, svcCtx)})               //配置表单
	r.POST("/Baseconfig/update", func(c *gin.Context) {baseconfig.Update(c, svcCtx)})               //配置表单
}

